clear all
set more off

*** IMPORT doc count for the Fed
cd "C:\Dropbox\Average_target_survey\replication_folder\external_data"


import excel using "Factiva_JacksonHole_DailyCounts_2020601_2021116_USNewspapers.xlsx", ///
	sheet("federalreserve_rstusa") cellrange("A4:B173") firstrow clear	
	
rename DocumentCount count_FED
cd "C:\Dropbox\Average_target_survey\replication_folder\workfiles"
compress
save temp_step011A, replace 
	
	
*** IMPORT doc count for the MONETARY POLICY
cd "C:\Dropbox\Average_target_survey\replication_folder\external_data"

import excel using "Factiva_JacksonHole_DailyCounts_2020601_2021116_USNewspapers.xlsx", ///
	sheet("monetarypolicy_rstusa") cellrange("A4:B173") firstrow clear	
rename DocumentCount count_MP
cd "C:\Dropbox\Average_target_survey\replication_folder\workfiles"
compress
save temp_step011B, replace 
	
	
*** IMPORT doc count for the MONETARY POLICY
cd "C:\Dropbox\Average_target_survey\replication_folder\external_data"

import excel using "Factiva_JacksonHole_DailyCounts_2020601_2021116_USNewspapers.xlsx", ///
	sheet("inflation_rstusa") cellrange("A4:B173") firstrow clear	
rename DocumentCount count_INFLATION
cd "C:\Dropbox\Average_target_survey\replication_folder\workfiles"
compress
save temp_step011C, replace 

*** IMPORT doc count for the POWELL
cd "C:\Dropbox\Average_target_survey\replication_folder\external_data"

import excel using "Factiva_JacksonHole_DailyCounts_2020601_2021116_USNewspapers.xlsx", ///
	sheet("powell_rstusa") cellrange("A4:B173") firstrow clear
rename DocumentCount count_POWELL
cd "C:\Dropbox\Average_target_survey\replication_folder\workfiles"
compress
save temp_step011D, replace 
	
use temp_step011A, clear
joinby Date using temp_step011B
joinby Date using temp_step011C
joinby Date using temp_step011D

compress
label var count_FED "Document count: US Newspapers: Federal Reserve"
label var count_MP "Document count: US Newspapers: Monetary Policy"
label var count_INFLATION "Document count: US Newspapers: Inflation"
label var count_POWELL "Document count: US Newspapers: Powell"

save step011, replace
	